Optimal. Leaf size=16 \[ -\frac {a x^{-n}}{n}+b \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {14}
\begin {gather*} b \log (x)-\frac {a x^{-n}}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rubi steps
\begin {align*} \int x^{-1-n} \left (a+b x^n\right ) \, dx &=\int \left (\frac {b}{x}+a x^{-1-n}\right ) \, dx\\ &=-\frac {a x^{-n}}{n}+b \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 21, normalized size = 1.31 \begin {gather*} -\frac {a x^{-n}}{n}+\frac {b \log \left (x^n\right )}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 17, normalized size = 1.06
method | result | size |
risch | \(-\frac {a \,x^{-n}}{n}+b \ln \left (x \right )\) | \(17\) |
norman | \(\left (b \ln \left (x \right ) {\mathrm e}^{n \ln \left (x \right )}-\frac {a}{n}\right ) {\mathrm e}^{-n \ln \left (x \right )}\) | \(25\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 16, normalized size = 1.00 \begin {gather*} b \log \left (x\right ) - \frac {a}{n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 21, normalized size = 1.31 \begin {gather*} \frac {b n x^{n} \log \left (x\right ) - a}{n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 110 vs.
\(2 (10) = 20\).
time = 1.35, size = 110, normalized size = 6.88 \begin {gather*} \begin {cases} a x + b \log {\left (x \right )} & \text {for}\: n = -1 \\\left (a + b\right ) \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {a n}{n^{2} x^{n} + n x^{n}} - \frac {a}{n^{2} x^{n} + n x^{n}} - \frac {b n x^{n} \log {\left (x^{- n} \right )}}{n^{2} x^{n} + n x^{n}} + \frac {b n x^{n}}{n^{2} x^{n} + n x^{n}} - \frac {b x^{n} \log {\left (x^{- n} \right )}}{n^{2} x^{n} + n x^{n}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.75, size = 21, normalized size = 1.31 \begin {gather*} \frac {b n x^{n} \log \left (x\right ) - a}{n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.41, size = 29, normalized size = 1.81 \begin {gather*} \left \{\begin {array}{cl} \ln \left (x\right )\,\left (a+b\right ) & \text {\ if\ \ }n=0\\ b\,\ln \left (x\right )-\frac {a}{n\,x^n} & \text {\ if\ \ }n\neq 0 \end {array}\right . \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________